package logic;

import structure.RedBlackSearchTree;

/**
 * WordSetBR
 * @author Jorge Lainfiesta 11142
 * @since Oct 17, 2012
 * @version 1
 */
public class WordSetRB implements WordSet {

    RedBlackSearchTree<Word> base;
    
    /**
     * Constructor
     */
    public WordSetRB(){
        base = new RedBlackSearchTree<Word>();
    }
    /**
     * Agrega elemento al conjunto
     * @param wordObject 
     */
    @Override
    public void add(Word wordObject) {
       if(!base.contains(wordObject))
            base.add(wordObject);
        
    }

    @Override
    public Word get(Word word) {
        return base.get(word);
    }

}
